#!/bin/bash
echo "server=" $1
server=("$@")

# tar and compress only important files

dir=${PWD##*/}
dirt=$dir"t"
dirtz=$dirt".tar.gz"

#compacting
echo $dirt
mkdir $dirt
cp define.h mylist.nml fort.3* xaverages.dat param.nml $dirt
tar czvf $dirtz $dirt

#sending files
echo "sending files to" $server
scp $dirtz $server

